<!doctype html>
<html>

<head>
  <meta name="generator" content="JSDoc 3.6.11">
  <meta charset="utf-8">
  <title>whatsapp-web.js 1.26.1-alpha.3 &raquo; Class: Buttons</title>
  <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
  <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
  <link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
  <link href="css/baseline.css" rel="stylesheet">
</head>

<body onload="prettyPrint()">
  <nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
    <div id="jsdoc-navbar-container">
      <div id="jsdoc-navbar-content">
        <a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>26.<wbr>1-alpha.<wbr>3</a>
      </div>
    </div>
  </nav>
  <div id="jsdoc-body-container">
    <div id="jsdoc-content">
      <div id="jsdoc-content-container">
        <div id="jsdoc-main" role="main">
          <header class="page-header">
            <div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
            <h1><small></small><span class="symbol-name">Buttons</span></h1>
            <p class="source-link">Source: <a href="structures_Buttons.js.html#source-line-23">structures/<wbr>Buttons.<wbr>js:23</a></p>
            <div class="symbol-classdesc">
              <p>Message type buttons</p>
            </div>
            <dl class="dl-compact">
            </dl>
          </header>
          <section id="summary">
            <div class="summary-callout">
              <h2 class="summary-callout-heading">Properties</h2>
              <div class="summary-content">
                <div class="summary-column">
                  <dl class="dl-summary-callout">
                    <dt><a href="Buttons.html#body">body</a></dt>
                    <dd>
                    </dd>
                    <dt><a href="Buttons.html#buttons">buttons</a></dt>
                    <dd>
                    </dd>
                  </dl>
                </div>
                <div class="summary-column">
                  <dl class="dl-summary-callout">
                    <dt><a href="Buttons.html#footer">footer</a></dt>
                    <dd>
                    </dd>
                    <dt><a href="Buttons.html#title">title</a></dt>
                    <dd>
                    </dd>
                  </dl>
                </div>
                <div class="summary-column">
                </div>
              </div>
            </div>
            <div class="summary-callout">
              <h2 class="summary-callout-heading">Method</h2>
              <div class="summary-content">
                <div class="summary-column">
                  <dl class="dl-summary-callout">
                    <dt><a href="Buttons.html#_format">_format(buttons)</a></dt>
                    <dd>
                    </dd>
                  </dl>
                </div>
                <div class="summary-column">
                </div>
                <div class="summary-column">
                </div>
              </div>
            </div>
          </section>
          <section>
            <h2 id="Buttons">new&nbsp;<span class="symbol-name">Buttons</span><span class="signature"><span class="signature-params">(body, buttons, title, footer)</span></span></h2>
            <section>
              <h3>Parameters</h3>
              <table class="jsdoc-details-table">
                <thead>
                  <tr>
                    <th>Name</th>
                    <th>Type</th>
                    <th>Optional</th>
                    <th>Description</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td>
                      <p>body</p>
                    </td>
                    <td>
                      <p>&nbsp;</p>
                    </td>
                    <td>
                      <p>&nbsp;</p>
                    </td>
                    <td>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <p>buttons</p>
                    </td>
                    <td>
                      <p>&nbsp;</p>
                    </td>
                    <td>
                      <p>&nbsp;</p>
                    </td>
                    <td>
                      <p>See <a href="global.html#ButtonSpec"><code>ButtonSpec</code></a></p>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <p>title</p>
                    </td>
                    <td>
                      <p>&nbsp;</p>
                    </td>
                    <td>
                      <p>&nbsp;</p>
                    </td>
                    <td>
                      <p>Value can be null.</p>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <p>footer</p>
                    </td>
                    <td>
                      <p>&nbsp;</p>
                    </td>
                    <td>
                      <p>&nbsp;</p>
                    </td>
                    <td>
                      <p>Value can be null.</p>
                    </td>
                  </tr>
                </tbody>
              </table>
            </section>
            <dl class="dl-compact">
            </dl>
          </section>
          <section>
            <h2>Properties</h2>
            <section>
              <h3 id="body"><span class="symbol-name">body</span><small class="property-type">
                  &nbsp;(string or <a href="MessageMedia.html">MessageMedia</a>)</small></h3>
              <p>Message body</p>
              <dl class="dl-compact">
              </dl>
              <h3 id="buttons"><span class="symbol-name">buttons</span><small class="property-type">
                  &nbsp;Array of <a href="global.html#FormattedButtonSpec">FormattedButtonSpec</a></small></h3>
              <p>buttons of message</p>
              <dl class="dl-compact">
              </dl>
              <h3 id="footer"><span class="symbol-name">footer</span><small class="property-type">
                  &nbsp;string</small></h3>
              <p>footer of message</p>
              <dl class="dl-compact">
              </dl>
              <h3 id="title"><span class="symbol-name">title</span><small class="property-type">
                  &nbsp;string</small></h3>
              <p>title of message</p>
              <dl class="dl-compact">
              </dl>
            </section>
            <h2>Method</h2>
            <section>
              <h3 id="_format"><span class="symbol-name">_format</span><span class="signature"><span class="signature-params">(buttons)</span>&nbsp;&rarr; <span class="signature-returns"> Array of <a href="global.html#FormattedButtonSpec">FormattedButtonSpec</a></span></span></h3>
              <p>Creates button array from simple array</p>
              <section>
                <h4>
                  Example
                </h4>
                <div>
                  <pre class="prettyprint"><code>Input: [{id:&#x27;customId&#x27;,body:&#x27;button1&#x27;},{body:&#x27;button2&#x27;},{body:&#x27;button3&#x27;},{body:&#x27;button4&#x27;}]
Returns: [{ buttonId:&#x27;customId&#x27;,buttonText:{&#x27;displayText&#x27;:&#x27;button1&#x27;},type: 1 },{buttonId:&#x27;n3XKsL&#x27;,buttonText:{&#x27;displayText&#x27;:&#x27;button2&#x27;},type:1},{buttonId:&#x27;NDJk0a&#x27;,buttonText:{&#x27;displayText&#x27;:&#x27;button3&#x27;},type:1}]</code></pre>
                </div>
              </section>
              <section>
                <h4>Parameter</h4>
                <table class="jsdoc-details-table">
                  <thead>
                    <tr>
                      <th>Name</th>
                      <th>Type</th>
                      <th>Optional</th>
                      <th>Description</th>
                    </tr>
                  </thead>
                  <tbody>
                    <tr>
                      <td>
                        <p>buttons</p>
                      </td>
                      <td>
                        <p>Array of <a href="global.html#ButtonSpec">ButtonSpec</a></p>
                      </td>
                      <td>
                        <p>&nbsp;</p>
                      </td>
                      <td>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </section>
              <dl class="dl-compact">
                <dt>Returns</dt>
                <dd>
                  <p><code>Array of <a href="global.html#FormattedButtonSpec">FormattedButtonSpec</a></code> </p>
                </dd>
              </dl>
            </section>
          </section>
        </div>
      </div>
      <nav id="jsdoc-toc-nav" role="navigation"></nav>
    </div>
  </div>
  <footer id="jsdoc-footer" class="jsdoc-footer">
    <div id="jsdoc-footer-container">
      <p>
        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on November 22, 2024.
      </p>
    </div>
  </footer>
  <script src="scripts/jquery.min.js"></script>
  <script src="scripts/tree.jquery.js"></script>
  <script src="scripts/prettify.js"></script>
  <script src="scripts/jsdoc-toc.js"></script>
  <script src="scripts/linenumber.js"></script>
  <script src="scripts/scrollanchor.js"></script>
</body>

</html>